package cn.huijielong.modules.group.service;

import cn.huijielong.modules.group.entity.GoodsEntity;
import cn.huijielong.common.utils.Query;
import java.util.List;
import java.util.Map;

import org.springframework.web.multipart.MultipartFile;

import com.github.pagehelper.Page;

/**
 * 商品
 * 
 * @author xys
 * @email xys@gmail.com
 * @date 2019-07-03 22:46:43
 */
public interface GoodsService {
	
	GoodsEntity queryObject(Long goodsId);
	
	Page<GoodsEntity> queryList(Query q);
	
	int queryTotal(Map<String, Object> map);
	
	void save(GoodsEntity goods);
	void save(List<GoodsEntity> goodsList);
	
	void update(GoodsEntity goods);
	void update(List<GoodsEntity> goodsList);
	
	void delete(Long goodsId);
	
	void deleteBatch(Long[] goodsIds);
	/**
	 * 上传商品图片
	 * @param img
	 * @param goodsId
	 * @param add
	 */
	void uploadImage(List<MultipartFile> img, Long goodsId, boolean add);
}
